package com.kyd.push.common.result;

/**
 * RetCode 响应状态码
 *
 * @author kejw on 2018/7/10
 */
public enum RetCode {

	OK(1, "ok"),
	FAIL(0, "fail"),
	ERROR(10000, "服务错误"),
	UNREGISTERED(10001, "用户未注册"),
	UNAUTHORIZED(10002, "登录过期或没有权限"),
	LOCKED(10003, "账号锁定"),
	PARAM_ERROR(11000, "参数错误"),
	DATA_ACCESS_ERROR(15000, "数据访问层错误"),
	;

	private final int value;
	private final String reasonPhrase;

	RetCode(int value, String reasonPhrase) {
		this.value = value;
		this.reasonPhrase = reasonPhrase;
	}


	public int value() {
		return this.value;
	}

	public String getReasonPhrase() {
		return this.reasonPhrase;
	}

}
